home *** CD-ROM | disk | FTP | other *** search
/ Amiga Plus 2000 #4 / Amiga Plus CD - 2000 - No. 4.iso / PowerPC / Dev / PPCRelease / FD2Inline / Makefile < prev    next >
Encoding:
Makefile  |  1997-12-12  |  10.2 KB  |  283 lines

  1. # Generated automatically from Makefile.in by configure.
  2. srcdir =    .
  3.  
  4. prefix =    ./fd2inline-bin/
  5. exec_prefix =    ${prefix}
  6.  
  7. bindir =    $(exec_prefix)/bin
  8. libdir =    $(exec_prefix)/lib
  9. incdir =    $(prefix)/include
  10. guidedir =    $(prefix)/guide
  11.  
  12. INSTALL =    /bin/install -c
  13. INSTALL_PROGRAM = ${INSTALL} -s
  14. INSTALL_DATA =    ${INSTALL} -m 644
  15.  
  16. SHELL =        /bin/sh
  17. CC =        gcc
  18. AR =        ar
  19. RM =        rm -rf
  20. CP =        cp -a
  21. MAKEINFO =    makeinfo
  22. LHA =        lha -mraxe
  23. MV =        mv
  24. STRIP =        strip
  25. TAR =        tar -vz
  26. RANLIB =    ranlib
  27. AWK =        gawk
  28. DEFS =         
  29. LIBS =        
  30. CFLAGS =    -g -O2
  31. LDFLAGS =    
  32. PROTECT =    /c/protect
  33.  
  34. # Used when building fd2inline, fd2inline.guide and the archives.
  35. VERSION =    1.12
  36.  
  37. FD_DIR =    $(prefix)/os-lib/fd
  38. OS_INC_DIR =    $(prefix)/os-include
  39.  
  40. OUR_CFLAGS =    $(DEFS) -Wall -Wstrict-prototypes '-DVERSION="$(VERSION)"' -resident $(CFLAGS)
  41.  
  42. # Pseudo-targets.
  43. BUILD_INLINES     =    stmp-built-inlines
  44. BUILD_PPCINLINES =    stmp-built-ppcinlines
  45. BUILD_PRAGMAS     =    stmp-built-pragmas
  46. BUILD_PPCPRAGMAS =    stmp-built-ppcpragmas
  47. BUILD_PROTOS     =    stmp-built-protos
  48. BUILD_PPCPROTOS     =    stmp-built-ppcprotos
  49. BUILD_LIBS     =    stmp-built-libs
  50.  
  51. # List of linker libraries to build. Each entry is INCBASE!LIBBASE (see below).
  52. NONSTD_LIBS =    muimaster!mui ums!ums dospath!dospath \
  53.         screennotify!screennotify wbstart!wbstart
  54.  
  55. # Archive names.
  56. SRC_ARCHIVE_LHA = fd2inline-$(VERSION)-src.lha
  57. SRC_ARCHIVE_TGZ = fd2inline-$(VERSION)-src.tgz
  58. BIN_ARCHIVE =    fd2inline-$(VERSION)-bin.lha
  59.  
  60. # Used when building archives
  61. TMP_DIR =    /tmp
  62. TMP_SUBDIR =    fd2inline-$(VERSION)
  63.  
  64. # Flags to pass to submake.
  65. FLAGS_TO_PASS =    "CC=$(CC)" \
  66.         "AWK=$(AWK)" \
  67.         "RM=$(RM)" \
  68.         "AR=$(AR)" \
  69.         "RANLIB=$(RANLIB)" \
  70.         "OS_INC_DIR=$(OS_INC_DIR)" \
  71.         "FD_DIR=$(FD_DIR)"
  72.  
  73. #all:        fd2inline
  74. all:        fd2inline $(BUILD_PPCINLINES) $(BUILD_PPCPRAGMAS) $(BUILD_PPCPROTOS) 
  75. #all:        fd2inline $(BUILD_INLINES) $(BUILD_PRAGMAS) $(BUILD_PROTOS) $(BUILD_LIBS) guide
  76.  
  77. fd2inline:    fd2inline.c
  78.         $(CC) $(OUR_CFLAGS) $(LDFLAGS) -o fd2inline $(srcdir)/fd2inline.c $(LIBS)
  79.         if [ -f $(PROTECT) ]; then $(PROTECT) fd2inline +p; else true; fi
  80.  
  81. install:    all
  82.         $(INSTALL_PROGRAM) fd2inline $(bindir)/fd2inline
  83.         if [ -f $(PROTECT) ]; then \
  84.             (cd $(bindir); $(PROTECT) fd2inline +p); \
  85.         else true; \
  86.         fi
  87.         if [ -d $(incdir)/inline ]; then true; else mkdir $(incdir)/inline; fi
  88.         $(INSTALL_DATA) $(srcdir)/include/inline-src/*.h $(incdir)/inline
  89.         $(INSTALL_DATA) include/inline/*.h $(incdir)/inline
  90.         if [ -d $(incdir)/pragmas ]; then true; else mkdir $(incdir)/pragmas; fi
  91.         $(INSTALL_DATA) include/pragmas/*.h $(incdir)/pragmas
  92.         if [ -d $(incdir)/proto ]; then true; else mkdir $(incdir)/proto; fi
  93.         $(INSTALL_DATA) $(srcdir)/include/proto-src/*.h $(incdir)/proto
  94.         $(INSTALL_DATA) include/proto/*.h $(incdir)/proto
  95.         libs=`echo lib/lib*.a` ; if [ "lib/lib*.a" != "$${libs}" ]; then \
  96.           $(INSTALL_DATA) lib/lib*.a $(libdir); \
  97.         else true; fi
  98.         libs=`echo lib/libb/lib*.a` ; if [ "lib/libb/lib*.a" != "$${libs}" ]; then \
  99.           $(INSTALL_DATA) lib/libb/lib*.a $(libdir)/libb; \
  100.         else true; fi
  101.         libs=`echo lib/libb32/libm020/lib*.a` ; if [ "lib/libb32/libm020/lib*.a" != "$${libs}" ]; then \
  102.           $(INSTALL_DATA) lib/libb32/libm020/lib*.a $(libdir)/libb32/libm020; \
  103.         else true; fi
  104.         $(INSTALL_DATA) fd2inline.guide $(guidedir)
  105.  
  106. dist:        all
  107.         # Create a temporary location.
  108.         if [ -d $(TMP_DIR)/$(TMP_SUBDIR) ]; then true; else mkdir $(TMP_DIR)/$(TMP_SUBDIR); fi
  109.         if [ -d $(TMP_DIR)/$(TMP_SUBDIR)/include ]; then true; else mkdir $(TMP_DIR)/$(TMP_SUBDIR)/include; fi
  110.         if [ -d $(TMP_DIR)/$(TMP_SUBDIR)/lib ]; then true; else mkdir $(TMP_DIR)/$(TMP_SUBDIR)/lib; fi
  111.         # Copy the source directory to it.
  112.         ( \
  113.             cd $(srcdir); \
  114.             $(CP) include/inline-src $(TMP_DIR)/$(TMP_SUBDIR)/include; \
  115.             $(CP) include/proto-src $(TMP_DIR)/$(TMP_SUBDIR)/include; \
  116.             $(CP) lib/Makefile.in lib/splitasm.awk $(TMP_DIR)/$(TMP_SUBDIR)/lib; \
  117.             $(CP) manifests patches configure* COPYING fd2inline.c \
  118.                 fd2inline.texi install.sh Makefile.in \
  119.                 makepragmas.awk Product-Info \
  120.                 $(TMP_DIR)/$(TMP_SUBDIR) \
  121.         )
  122.         # Create the source archives.
  123.         ( \
  124.             cd $(TMP_DIR); \
  125.             $(LHA) a $(SRC_ARCHIVE_LHA) $(TMP_SUBDIR) \
  126.         )
  127.         $(RM) $(SRC_ARCHIVE_LHA)
  128.         $(CP) $(TMP_DIR)/$(SRC_ARCHIVE_LHA) .
  129.         $(RM) $(TMP_DIR)/$(SRC_ARCHIVE_LHA)
  130.         $(TAR) -cf $(SRC_ARCHIVE_TGZ) -C $(TMP_DIR) $(TMP_SUBDIR)
  131.         # Reorganize the temporary location.
  132.         ( \
  133.             cd $(TMP_DIR)/$(TMP_SUBDIR)/include; \
  134.             $(MV) inline-src inline; \
  135.             $(MV) proto-src proto; \
  136.             $(RM) ../lib/* \
  137.         )
  138.         # Copy the build directory to the temporary location.
  139.         $(CP) include/inline include/pragmas include/proto $(TMP_DIR)/$(TMP_SUBDIR)/include
  140.         if [ -d $(TMP_DIR)/$(TMP_SUBDIR)/bin ]; then true; else mkdir $(TMP_DIR)/$(TMP_SUBDIR)/bin; fi
  141.         $(CP) fd2inline $(TMP_DIR)/$(TMP_SUBDIR)/bin
  142.         $(STRIP) $(TMP_DIR)/$(TMP_SUBDIR)/bin/fd2inline
  143.         if [ -f $(PROTECT) ]; then \
  144.             (cd $(TMP_DIR)/$(TMP_SUBDIR)/bin; $(PROTECT) fd2inline +p); \
  145.         else true; \
  146.         fi
  147.         $(CP) lib/lib*.a $(TMP_DIR)/$(TMP_SUBDIR)/lib
  148.         if [ -d $(TMP_DIR)/$(TMP_SUBDIR)/lib/libb ]; then true; else mkdir $(TMP_DIR)/$(TMP_SUBDIR)/lib/libb; fi
  149.         $(CP) lib/libb/lib*.a $(TMP_DIR)/$(TMP_SUBDIR)/lib/libb
  150.         if [ -d $(TMP_DIR)/$(TMP_SUBDIR)/lib/libb32 ]; then true; else mkdir $(TMP_DIR)/$(TMP_SUBDIR)/lib/libb32; fi
  151.         if [ -d $(TMP_DIR)/$(TMP_SUBDIR)/lib/libb32/libm020 ]; then true; else mkdir $(TMP_DIR)/$(TMP_SUBDIR)/lib/libb32/libm020; fi
  152.         $(CP) lib/libb32/libm020/lib*.a $(TMP_DIR)/$(TMP_SUBDIR)/lib/libb32/libm020
  153.         if [ -d $(TMP_DIR)/$(TMP_SUBDIR)/guide ]; then true; else mkdir $(TMP_DIR)/$(TMP_SUBDIR)/guide; fi
  154.         $(CP) fd2inline.guide $(TMP_DIR)/$(TMP_SUBDIR)/guide
  155.         # Create the binary archive.
  156.         ( \
  157.             cd $(TMP_DIR); \
  158.             $(LHA) a $(BIN_ARCHIVE) $(TMP_SUBDIR)/ bin guide include lib COPYING \
  159.         )
  160.         $(RM) $(BIN_ARCHIVE)
  161.         $(CP) $(TMP_DIR)/$(BIN_ARCHIVE) .
  162.         $(RM) $(TMP_DIR)/$(BIN_ARCHIVE)
  163.         $(RM) $(TMP_DIR)/$(TMP_SUBDIR)
  164.  
  165. $(BUILD_INLINES):    fd2inline
  166.         if [ -d include ]; then true; else mkdir include; fi
  167.         if [ -d include/inline ]; then true; else mkdir include/inline; fi
  168.         for fd in $(FD_DIR)/*.fd; do \
  169.             rootname=`basename $$fd .fd | sed "s:_lib$$::"`; \
  170.             if [ "$${rootname}" = "mathffp" -o "$${rootname}" = "mathtrans" ]; then \
  171.                 continue; \
  172.             fi; \
  173.             echo "making include/inline/$$rootname.h..."; \
  174.             ./fd2inline $$fd $(OS_INC_DIR)/clib/$${rootname}_protos.h -o include/inline/$$rootname.h; \
  175.         done
  176.         touch $(BUILD_INLINES)
  177.  
  178. $(BUILD_PPCINLINES):    fd2inline
  179.         if [ -d include ]; then true; else mkdir include; fi
  180.         if [ -d include/ppcinline ]; then true; else mkdir include/ppcinline; fi
  181.         for fd in $(FD_DIR)/*.fd; do \
  182.             rootname=`basename $$fd .fd | sed "s:_lib$$::"`; \
  183.             if [ "$${rootname}" = "mathffp" -o "$${rootname}" = "mathtrans" ]; then \
  184.                 continue; \
  185.             fi; \
  186.             echo "making include/ppcinline/$$rootname.h..."; \
  187.             ./fd2inline $$fd $(OS_INC_DIR)/clib/$${rootname}_protos.h -powerup -o include/ppcinline/$$rootname.h; \
  188.         done
  189.         touch $(BUILD_PPCINLINES)
  190.  
  191. $(BUILD_PRAGMAS):    $(srcdir)/makepragmas.awk
  192.         if [ -d include ]; then true; else mkdir include; fi
  193.         if [ -d include/pragmas ]; then true; else mkdir include/pragmas; fi
  194.         for fd in $(FD_DIR)/*.fd; do \
  195.             rootname=`basename $$fd .fd | sed "s:_lib$$::"`; \
  196.             if [ "$${rootname}" = "mathffp" -o "$${rootname}" = "mathtrans" ]; then \
  197.                 continue; \
  198.             fi; \
  199.             echo "making include/pragmas/$${rootname}_pragmas.h..."; \
  200.             $(AWK) -f $(srcdir)/makepragmas.awk -v PRAGMAS=$$rootname >include/pragmas/$${rootname}_pragmas.h; \
  201.         done
  202.         touch $(BUILD_PRAGMAS)
  203.  
  204. $(BUILD_PPCPRAGMAS):    fd2inline
  205.         if [ -d include ]; then true; else mkdir include; fi
  206.         if [ -d include/ppcpragmas ]; then true; else mkdir include/ppcpragmas; fi
  207.         for fd in $(FD_DIR)/*.fd; do \
  208.             rootname=`basename $$fd .fd | sed "s:_lib$$::"`; \
  209.             if [ "$${rootname}" = "mathffp" -o "$${rootname}" = "mathtrans" ]; then \
  210.                 continue; \
  211.             fi; \
  212.             echo "making include/ppcpragmas/$${rootname}_pragmas.h..."; \
  213.             ./fd2inline --pragma --powerup $$fd $(OS_INC_DIR)/clib/$${rootname}_protos.h -o include/ppcpragmas/$${rootname}_pragmas.h; \
  214.         done
  215.         touch $(BUILD_PPCPRAGMAS)
  216.  
  217. $(BUILD_PROTOS):    fd2inline
  218.         if [ -d include ]; then true; else mkdir include; fi
  219.         if [ -d include/proto ]; then true; else mkdir include/proto; fi
  220.         for fd in $(FD_DIR)/*.fd; do \
  221.             rootname=`basename $$fd .fd | sed "s:_lib$$::"`; \
  222.             if [ -f $(srcdir)/include/proto-src/$$rootname.h ]; then \
  223.                 continue; \
  224.             fi; \
  225.             echo "making include/proto/$$rootname.h..."; \
  226.             ./fd2inline --proto $$fd -o include/proto/$$rootname.h; \
  227.         done
  228.         touch $(BUILD_PROTOS)
  229.  
  230. $(BUILD_PPCPROTOS):    fd2inline
  231.         if [ -d include ]; then true; else mkdir include; fi
  232.         if [ -d include/ppcproto ]; then true; else mkdir include/ppcproto; fi
  233.         for fd in $(FD_DIR)/*.fd; do \
  234.             rootname=`basename $$fd .fd | sed "s:_lib$$::"`; \
  235.             if [ -f $(srcdir)/include/proto-src/$$rootname.h ]; then \
  236.                 continue; \
  237.             fi; \
  238.             echo "making include/ppcproto/$$rootname.h..."; \
  239.             ./fd2inline --proto $$fd --powerup -o include/ppcproto/$$rootname.h; \
  240.         done
  241.         touch $(BUILD_PROTOS)
  242.  
  243. $(BUILD_LIBS):    fd2inline
  244.         for bases in $(NONSTD_LIBS); do \
  245.             incbase=`echo $$bases | sed "s:!.*$$::"`; \
  246.             libbase=`echo $$bases | sed "s:^.*!::"`; \
  247.             if [ -f include/inline/$$incbase.h ]; then \
  248.                 echo "making lib$$libbase.a..."; \
  249.                 (cd lib; $(MAKE) $(FLAGS_TO_PASS) INCBASE=$$incbase LIBBASE=$$libbase); \
  250.             else true; fi; \
  251.         done
  252.         touch $(BUILD_LIBS)
  253.  
  254. guide:        fd2inline.guide
  255.  
  256. fd2inline.guide:    $(srcdir)/fd2inline.texi
  257.         if [ -f version.texi ]; then true; else echo "@set version $(VERSION)" >version.texi; fi
  258.         $(MAKEINFO) $(srcdir)/fd2inline.texi -o fd2inline.guide
  259.  
  260. # Make a linker library with stubs, if for some reason one can't use
  261. # inline headers. This requires two arguments on "make" commandline:
  262. #
  263. # INCBASE: base name of the includes (muimaster for MUI etc).
  264. # LIBBASE: base name of the library (mui for MUI etc).
  265.  
  266. alllib:        fd2inline
  267.         if [ "$(INCBASE)" = "" -o "$(LIBBASE)" = "" ]; then \
  268.             echo "Require two arguments: INCBASE and LIBBASE"; \
  269.         else \
  270.             (cd lib; $(MAKE) $(FLAGS_TO_PASS) INCBASE=$(INCBASE) LIBBASE=$(LIBBASE)); \
  271.         fi
  272.  
  273. clean:
  274.         $(RM) version.texi *.o *~ *!
  275.         (cd lib; $(MAKE) $(FLAGS_TO_PASS) clean)
  276.  
  277. clobber:    clean
  278.         $(RM) fd2inline fd2inline.guide \
  279.             include/inline include/pragmas include/proto \
  280.             $(BUILD_INLINES) $(BUILD_PRAGMAS) $(BUILD_PROTOS) $(BUILD_LIBS) \
  281.             $(SRC_ARCHIVE_LHA) $(SRC_ARCHIVE_TGZ) $(BIN_ARCHIVE)
  282.         (cd lib; $(MAKE) $(FLAGS_TO_PASS) clobber)
  283.